package com.zb.sannuo.thereport.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.sannuo.common.domain.ReportList;
import com.zb.sannuo.common.domain.search.DrugstoreInfo;
import com.zb.sannuo.common.domain.search.JianCeIndicators;
import com.zb.sannuo.common.domain.vo.ReportVo;
import com.zb.sannuo.thereport.mapper.ResportMapper;
import com.zb.sannuo.thereport.service.ReportService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ReportServiceImpl extends ServiceImpl<ResportMapper, JianCeIndicators> implements ReportService {

    @Resource
    private ResportMapper resportMapper;

    @Override
    public List<DrugstoreInfo> queryZdName() {
        return resportMapper.queryZdName();
    }

    @Override
    public List<DrugstoreInfo> queryFdName(String headStoreCode) {
        return resportMapper.queryFdName(headStoreCode);
    }

    @Override
    public List<ReportList> queryZbName() {
        return resportMapper.queryZbName();
    }

    @Override
    public Page JcZbPage(int current, int number, ReportVo reportVo) {

        System.out.println(resportMapper);
        Page page = new Page(current,number);
        return page.setRecords(resportMapper.findJcZb(page,reportVo));

    }

    @Override
    public Page RecordPage(int current, int number, ReportVo reportVo) {

        System.out.println(resportMapper);
        Page page = new Page(current,number);
        return page.setRecords(resportMapper.findJcRecord(page,reportVo));
    }
}
